using UnityEngine;
// [Assembly-CSharp.dll].CFX_AutoDestructShuriken
public class CFX_AutoDestructShuriken : MonoBehaviour
{
    
    #region CFX_AutoDestructShuriken.<CheckIfAlive>d__2
    // [Assembly-CSharp.dll].CFX_AutoDestructShuriken.<CheckIfAlive>d__2
    private sealed class _CheckIfAlive_d__2 : IEnumerator<object>, IEnumerator, IDisposable
    {
        // Fields
        private int __1__state;
        private object __2__current;
        public CFX_AutoDestructShuriken __4__this;
        private UnityEngine.ParticleSystem _ps_5__2;
        
        // Properties
        private object System.Collections.Generic.IEnumerator<System.Object>.Current { get; }
        private object System.Collections.IEnumerator.Current { get; }
        
        // Methods
        public _CheckIfAlive_d__2(int __1__state)
        {
            this.__1__state = __1__state;
        }
        private void System.IDisposable.Dispose()
        {
        
        }
        private bool MoveNext()
        {
            CFX_AutoDestructShuriken val_6 = this.__4__this;
            if(this.__1__state == 1)
            {
                goto label_1;
            }
            
            if(this.__1__state != 0)
            {
                    return false;
            }
            
            this.__1__state = 0;
            this._ps_5__2 = val_6.GetComponent<System.Object>();
            goto label_4;
            label_1:
            this.__1__state = 0;
            if((this._ps_5__2.IsAlive(withChildren:  true)) == false)
            {
                goto label_6;
            }
            
            label_4:
            val_6 = this._ps_5__2;
            if(val_6 == 0)
            {
                    return false;
            }
            
            UnityEngine.WaitForSeconds val_4 = 536895821;
            val_6 = val_4;
            val_4 = new UnityEngine.WaitForSeconds(seconds:  0.5f);
            this.__2__current = val_6;
            this.__1__state = 1;
            return false;
            label_6:
            UnityEngine.GameObject val_5 = val_6.gameObject;
            if(this.__4__this.OnlyDeactivate != false)
            {
                    val_5.SetActive(value:  false);
                return false;
            }
            
            UnityEngine.Object.Destroy(obj:  val_5);
            return false;
        }
        private object System.Collections.Generic.IEnumerator<System.Object>.get_Current()
        {
            return (object)this.__2__current;
        }
        private void System.Collections.IEnumerator.Reset()
        {
            27351792 = new System.NotSupportedException();
            throw 27351792;
        }
        private object System.Collections.IEnumerator.get_Current()
        {
            return (object)this.__2__current;
        }
    
    }
    
    #endregion
    
    // Fields
    public bool OnlyDeactivate;
    
    // Methods
    private void OnEnable()
    {
        UnityEngine.Coroutine val_1 = this.StartCoroutine(methodName:  -1610608793);
    }
    private System.Collections.IEnumerator CheckIfAlive()
    {
        object val_1 = 536897735;
        val_1 = new System.Object();
        mem[536897751] = 0;
        mem[536897767] = this;
        return (System.Collections.IEnumerator)val_1;
    }
    public CFX_AutoDestructShuriken()
    {
    
    }

}
